package com.xuecheng.base.exception;

/**
 * @ClassName XueChengPlusException
 * @Description 类注释
 * @Author 开发者
 * @Date 2023-03-24 18:00
 */
public class XueChengPlusException extends RuntimeException{

    private String erredMessage;

    public XueChengPlusException(String erredMessage) {
        super(erredMessage);
        this.erredMessage = erredMessage;
    }

    public XueChengPlusException() {
        super();
    }

    public String getErredMessage() {
        return erredMessage;
    }

    public static void cast(CommonError commonError){
        throw new XueChengPlusException(commonError.getErrMessage());
    }

    public static void cast(String errMessage){
        throw new XueChengPlusException(errMessage);
    }
}
